export default (url,method,params) => {
	console.log(url);
	// uni.showLoading({
	// 	title:'加载中'
	// });
	const token = uni.getStorageSync('token');
	// if(!token){
	// 	//执行没有登录逻辑
	// 	return
	// }
	return new Promise((resolve, reject) => {
		wx.request({
			url: "http://127.0.0.2:8188" + url,
			method: method,
			header: {
				token: token,
				'content-type': 'application/x-www-form-urlencoded'
				//'content-type': 'application/json'
			},
			data:params,
			success(res) {
				resolve(res.data);
			},
			fail(err) {
				reject(err);
			},
			complete() {
				uni.hideLoading();
			}
		});
	});
}